package com.onlineMIS.ORM.entity.chainS.user;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class ChainRoleType implements Serializable{
	
    /**
	 * 
	 */
	private static final long serialVersionUID = 4595888084252900421L;
	public static final int CHAIN_ADMIN= 1;
    public static final int CHAIN_MGMT= 2;
    public static final int CHAIN_OWNER= 3;
    public static final int CHAIN_LEAD= 4; //店长
    public static final int CHAIN_STAFF= 5; //店员
    public static final int CHAIN_ASISTANT_LEAD= 6; //店助
    public static final int SELE_CHAIN_STAFF= 7;
    public static final int HEAD_ADMIN= 8;
    public static final int HEAD_CHAIN_MANAGER= 9;//连锁店经理（督导）
    public static final int HEAD_REGION_MANAGER= 10;//区域经理
    
    public static final int HEAD_COMMODITY= 11; // 商品经理
    public static final int HEAD_ACCOUNTING= 12; // 总部销售人员
    public static final int HEAD_SALE= 13; // 总部会计人员
    
    public static final int IS_HEAD = 1;
    public static final int IS_CHAIN = 0;
    
    public static final int STATUS_OK = 0;
    
   
    
	private int chainRoleTypeId;
	private String chainRoleTypeName;
	private int isHead;
	private int status;
	
	
	
	
	
	public int getIsHead() {
		return isHead;
	}
	public void setIsHead(int isHead) {
		this.isHead = isHead;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}

	private Set<ChainUserFunctionality> chainUserFunctionalities =new HashSet<ChainUserFunctionality>();
	
	public Set<ChainUserFunctionality> getChainUserFunctionalities() {
		return chainUserFunctionalities;
	}
	public void setChainUserFunctionalities(
			Set<ChainUserFunctionality> chainUserFunctionalities) {
		this.chainUserFunctionalities = chainUserFunctionalities;
	}
	public int getChainRoleTypeId() {
		return chainRoleTypeId;
	}
	public void setChainRoleTypeId(int chainRoleTypeId) {
		this.chainRoleTypeId = chainRoleTypeId;
	}
	public String getChainRoleTypeName() {
		return chainRoleTypeName;
	}
	public void setChainRoleTypeName(String chainRoleTypeName) {
		this.chainRoleTypeName = chainRoleTypeName;
	}
	
	public boolean isAdmin(){
		if (getChainRoleTypeId() == CHAIN_ADMIN)
			return true;
		else 
			return false;
	}
	public boolean isHqAdmin(){
		if (getChainRoleTypeId() == HEAD_ADMIN)
			return true;
		else 
			return false;
	}
	
	public boolean isMgmt(){
		if (getChainRoleTypeId() == CHAIN_MGMT)
			return true;
		else 
			return false;
	}
	
	public boolean isHeadCommodity(){
		if (getChainRoleTypeId() == HEAD_COMMODITY)
			return true;
		else 
			return false;
	}
	
	public boolean isOwner(){
		if (getChainRoleTypeId() == CHAIN_OWNER)
			return true;
		else 
			return false;
	}
		public boolean isRegionMgmt(){
		if (getChainRoleTypeId() == HEAD_COMMODITY)
			return true;
		else 
			return false;
	}

}
